package com.lai.gulimall.auth.feign;


import com.lai.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("gulimall-third-party")
public interface ThirdPartFeignService {

    /**
     * 图形验证码
     * @param token 客户端传入的token
     * @return
     * @throws Exception
     */
    @GetMapping("/captcha")
    public R graphValidate(@RequestParam("token") String token) throws Exception;

    /**
     * 发送短信验证码
     * @param phoneNumbers 手机号
     * @param code 验证码
     * @return
     */
    @PostMapping("/sms/sendVerificationCode")
    public R sendVerificationCode(@RequestParam("phoneNumbers") String phoneNumbers, @RequestParam("code") int code);

}
